home *** CD-ROM | disk | FTP | other *** search
- /*
- * SFskyedit - Star Fighter 3000 sky colours editor
- * Sky editing window
- * Copyright (C) 2001 Chris Bazley
- */
-
- #ifndef SFSEditSky_h
- #define SFSEditSky_h
-
- #include <time.h>
- #include <stdbool.h>
-
- #include "toolbox.h"
- #include "SFformats.h"
-
- typedef char colstring[9]; /* "C/bbggrr"+0 */
-
- typedef struct _ViewData
- {
- ObjectId window_id; /* editing window */
- ObjectId preview_id; /* preview window (if any) */
- ObjectId dispvalues_pane; /* attached pane */
- ObjectId menu; /* attached menu */
-
- SF_SkyColours *sky; /* sky file to edit (flex anchor) */
- char *last_savepath;
- bool changed_since_save;
- int file_date[2]; /* 000000CC DDDDDDDD */
- colstring *icon_validations; /* 24-bit background colours (flex anchor) */
- char *icon_FGcols; /* Wimp foreground colours (flex anchor) */
- bool selection_exists;
- char selection_start; /* Both are INCLUSIVE */
- char selection_end; /* e.g. 1st & 2nd band would be start=0, end=1; */
- char caret_position; /* before colour band X (0-63) or -1 for no caret */
- bool has_input_focus;
- clock_t last_scroll;
- bool trap_caret;
- } ViewData;
-
- extern bool def_trap_caret;
-
- extern ObjectId EditSky_create(SF_SkyColours **sky, char *title, bool title_is_file);
- extern void EditSky_paste(ViewData *data);
- extern void EditSky_clearselection(ViewData *data);
- extern void EditSky_set_starheight(ObjectId objectref, int height);
- extern void EditSky_set_minheight(ObjectId objectref, int height);
- extern void EditSky_preview(ViewData *data);
- extern bool EditSky_newfile(ViewData *data, char *title, bool title_is_file);
- extern void EditSky_markaschanged(ViewData *data);
- extern void EditSky_rowsupdated(ViewData *data, int start_band, int end_band);
- extern void EditSky_set_caretpos(ViewData *data, int new_pos);
- extern void EditSky_changeselection(ViewData *data, int newsel_start, int newsel_end);
- extern void EditSky_openparentdir(ViewData *data);
- extern void EditSky_remove_sel(ViewData *view_data);
-
- #endif
-